{Mjagkova Jana. 12.09. vivod OD}

program Project11;

{$APPTYPE CONSOLE}

uses
 SysUtils;

var

a,b,c,i,min:integer;


begin
  Readln(a,b,c);

  If a>b then
   begin
     min:=b;
   End
   Else begin
     min:=a;
   end;
   If c<min then
     min:=c;
   For i:=1 to min do
     begin
       If (a mod i=0) and (b mod i=0) and (c mod i=0) then
         begin
           write(i, ' ');

         end;
     end;

    Readln;

end.
